const Layout = () => import("@/layout/BaseLayout.vue");
// 首页
const ProtoList = () => import("@/views/Home");
// 详情页
const ProtoDetail = () => import("@/views/Home/protoDetail.vue");

// 登录页
const Login = () => import("@/views/Login");

// 帮助
const Help = () => import("@/views/Help");

// 404
const NotFound = () => import("@/views/NotFound");

export default [
  {
    path: "/",
    component: Layout,
    children: [
      {
        path: "",
        name: "ProtoList",
        meta: {
          title: "项目列表"
        },
        component: ProtoList
      },
      {
        path: "proto-detail/:type/:id",
        name: "ProtoDetail",
        props: true,
        meta: {
          title: "详情"
        },
        component: ProtoDetail
      },
      {
        path: "help",
        name: "Help",
        props: true,
        meta: {
          title: "帮助"
        },
        component: Help
      }
    ]
  },
  {
    name: "login",
    path: "/login",
    meta: {
      title: "登录"
    },
    component: Login
  },
  {
    name: "404",
    path: "/404",
    meta: {
      title: "404"
    },
    component: NotFound
  },
  {
    path: "*",
    redirect: "/404"
  }
];
